package com.java.common.pojo;

/**
 * EmpJobId entity. @author MyEclipse Persistence Tools
 */

public class EmpJobId implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1295170264625740736L;
	// Fields

	private Emp emp;
	private Job job;

	// Constructors

	/** default constructor */
	public EmpJobId() {
	}

	/** full constructor */
	public EmpJobId(Emp emp, Job job) {
		this.emp = emp;
		this.job = job;
	}

	// Property accessors

	public Emp getEmp() {
		return this.emp;
	}

	public void setEmp(Emp emp) {
		this.emp = emp;
	}

	public Job getJob() {
		return this.job;
	}

	public void setJob(Job job) {
		this.job = job;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof EmpJobId))
			return false;
		EmpJobId castOther = (EmpJobId) other;

		return ((this.getEmp() == castOther.getEmp()) || (this.getEmp() != null
				&& castOther.getEmp() != null && this.getEmp().equals(
				castOther.getEmp())))
				&& ((this.getJob() == castOther.getJob()) || (this.getJob() != null
						&& castOther.getJob() != null && this.getJob().equals(
						castOther.getJob())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getEmp() == null ? 0 : this.getEmp().hashCode());
		result = 37 * result
				+ (getJob() == null ? 0 : this.getJob().hashCode());
		return result;
	}

}